#ifndef __TEMPERATURE_CONTROLLER_H
#define __TEMPERATURE_CONTROLLER_H	 
#include "stm32f0xx.h"
#include "function.h"

#define TEMPERATURE_CAPTURE_CHANNEL 0   //温度采样通道


#define TEMPERATURE_CONTROLLER_PERIOD  50     //温度控制周期   单位:ms

#define TEMPERATURE_CONTROLLER_KP 1000.0f        //PID控制器比例系数
#define TEMPERATURE_CONTROLLER_KI 600.0f        //PID控制器积分系数
#define TEMPERATURE_CONTROLLER_KD 10.0f         //PID控制器微分系数

//  增量式PID  0.1 0.04 0.01

typedef struct{
    
    float curTemperature;    //当前温度
    float setTemperature;    //设定温度

    POSPIDController PID;
    
}TemperatureController;


float GetTemperature(void);
void TemperatureController_Init(void);
void SetTemperature(float nTemperature);
uint8_t TemperatureControlTask(uint8_t info);

#endif
